const { defineConfig } = require('@vue/cli-service')
const webpack = require('webpack')
require('dotenv').config();
const { exec } = require('child_process');


console.log(process.env.VUE_APP_ID, `${process.env.VUE_APP_ID}/[file].map`)
module.exports = defineConfig({
  devServer: {
    port: 9000
  },
  
  productionSourceMap: true,
  chainWebpack(config) {
    config.devtool(false).end()
    config.plugin('SourceMapDevToolPlugin')
      .use(webpack.SourceMapDevToolPlugin).tap(args => {
        return [{
          filename: `${process.env.VUE_APP_ID}/[file].map`,
          publicPath: 'http://localhost:8080/',
          moduleFilenameTemplate: 'source-map'
        }]
      })
  }
})

// curl -T /path/to/local/file.txt http://example.com/upload/path

